set.seed(123)
#simulate a dataset with continuous data
dataset <- matrix( runif(1000 * 10, 1, 100), ncol = 10 )
#define a simulated class variable
target <- rpois(1000, 10)
a <- glm.bsreg(target, dataset, threshold = 0.05)
target <- rnorm(1000)
b <- glm.bsreg(target, dataset, threshold = 0.05)
target <- rbinom(1000, 1, 0.6)
d <- glm.bsreg(target, dataset, threshold = 0.05)
Run the code above in your browser using DataLab